import { notFound } from "next/navigation"; import type { ReactNode } from "react"; import { api } from "@/lib/api"; /** Existence check outside the loading boundary so unknown slugs return a real 404 (the fetch is cached for the page). */ export default async function IxpLayout({ children, params }: { children: ReactNode; params: Promise<{ slug: string }> }) { const { slug } = await params; const r = await api.ixp(slug); if (!r.ok && r.status === 404) notFound(); return children; }